package xyz.wpxy.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xyz.wpxy.domain.User;
import xyz.wpxy.mapper.UserMapper;
import xyz.wpxy.service.UserService;

import java.util.List;

/**
 * @author 卫鹏
 * @Description User业务层 实现类
 * @createTime 2022年01月07日 21:28:00
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> findAll() throws Exception {
        return userMapper.findAll();
    }

    @Override
    public User findByUserId(Integer userId) throws Exception {
        return userMapper.findByUserId(userId);
    }

    @Override
    public void updateUser(User user) throws Exception {
        userMapper.updateUser(user);
    }
}
